﻿<%@ Page Language="C#" MasterPageFile="~/admintractor/admin.master" AutoEventWireup="true" CodeFile="User.aspx.cs" Inherits="admintractor_User" Title="Danh sách người dùng" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="title">Dạnh sách người dùng</div>
					<div id="view">
						
					    <table style="width: 100%">
                            <tr>
                                <td>
                                   <asp:Label ID="lbError" runat="server" ForeColor="#FF3300"></asp:Label>
                                </td>
                            </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="butadd" runat="server" Text="Thêm mới" onclick="butadd_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" >
                                            <Columns>
                                                <asp:BoundField DataField="_userName" HeaderText="Đăng nhập" />
                                                <asp:BoundField DataField="_name" HeaderText="Họ tên" />
                                                <asp:BoundField DataField="_email" HeaderText="Email" />
                                                <asp:BoundField DataField="_messenger" HeaderText="Messenger" />
                                                <asp:TemplateField HeaderText="Quản trị">
                                                    <ItemTemplate>
                                                        <%#this.viewRole((int)(DataBinder.Eval(Container, "DataItem._roleID")))%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Trạng thái">
                                                    <ItemTemplate>
                                                        <%#this.viewStatus((string)(DataBinder.Eval(Container, "DataItem._status")))%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Thao tác">
                                                
                                                    <ItemTemplate>
                                                        <table style="width: 100%">
                                                            <tr>
                                                                <td>
                                                                    <asp:ImageButton ID="ImEdit" runat="server" ToolTip="Sửa" CommandArgument='<%# Eval("_userID","{0}") %>'
                                                                      CommandName="Select"  ImageUrl="~/App_Themes/admin/images/edit.png" 
                                                                        onclick="ImEdit_Click" />
                                                                </td>
                                                                <td>
                                                                    <asp:ImageButton ID="ImDelete" runat="server" ToolTip="Xóa" CommandArgument='<%# Eval("_userID","{0}") %>'
                                                                     CommandName="Select"  OnClientClick="return confirm('Are you sure?');" 
                                                                        ImageUrl="~/App_Themes/admin/images/delete.png" onclick="ImDelete_Click" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                </td>
                            </tr>
                        </table>
						
					</div>
</asp:Content>

